<form method="post" action="<?php echo $form->isNew() ? url_for('@AddNewRole') : url_for('@EditRole?id='.$form->getObject()->getId()) ?>" id="role_form" novalidate>
    <table dir="rtl">
        <?php echo $form ?>
        <tr>
            <td>
                <input type="submit" value="save" />
            </td>
        </tr>
    </table>
</form>